<!DOCTYPE html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script src="/public/vendor/assets/js/jquery.min.js"></script>
    <title>404页面模板</title>
    <style>
        body {
            background-color: #fff;
        }

        .auto {
            width: 1000px;
            margin: 80px auto;
        }

        .container {
            background: url(/public/assets/admin/images/404.jpg) no-repeat;
        }

        .settings {
            padding-left: 200px;
            padding-top: 160px;
            padding-bottom: 50px;
        }

        .settings .icon {
            display: block;
            width: 242px;
            height: 106px;
        }

        .settings h4 {
            margin: 30px 0 15px 0;
            font-size: 18px;
            color: #2cb7fd;
        }

        .settings p {
            font-size: 14px;
            color: #999;
        }

        .settings > div {
            margin-top: 40px;
            font-size: 0;
        }

        .settings > div a {
            display: inline-block;
            padding: 10px 40px;
            border: 1px solid #2cb7fd;
            font-size: 15px;
            color: #2cb7fd;
            text-decoration: none;
        }

        .settings > div a:first-child {
            margin-right: 20px;
            color: #fff;
            background-color: #2cb7fd;
        }
    </style>
</head>
<body>
<div class="auto">
    <div class="container">
        <div class="settings">
            <i class="icon"></i>
            <h4>很抱歉！没有找到您要访问的页面！</h4>
            <p style="color:red;"><span id="seconds_back"></span>将自动跳转到首页</p>
            <div>
                <a href="/admin" title="返回首页">返回首页</a>
                <a href="javascript:;" title="上一步" id="reload-btn">上一步</a>
            </div>
        </div>
    </div>
</div>

<script>
    //页面自动跳转
    function seconds_back() {
        if (all <= 0) {
            self.location = "/admin";
        }
        var obj = document.getElementById("seconds_back");
        if (obj) obj.innerHTML = all + " 秒后";
        all--;
    }

    var all = 5;
    if (all > 0) window.setInterval("seconds_back();", 1000);

    //返回按钮单击事件
    $("#reload-btn").click(function (e) {
        window.history.back();
    });

</script>

</body>
</html>